package com.example.lock;

import org.springframework.boot.actuate.health.AbstractHealthIndicator;
import org.springframework.boot.actuate.health.Health;
import org.springframework.stereotype.Component;

/**
 * 自定义监控内容
 */
@Component("my2")
public class MyAbstractHealthIndicator  extends AbstractHealthIndicator {
    @Override
    protected void doHealthCheck(Health.Builder builder) throws Exception {

        builder.withDetail("code", "---a-a-a-a")
                .withDetail("version", "0.0.1").up().build();
    }
}
